package com.atguigu.tingshu.album.client;

import com.alibaba.fastjson.JSONObject;
import com.atguigu.tingshu.model.album.TrackInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "service-album"
        , path = "/client/track/trackInfo", contextId = "trackClientFeign")
public interface TrackClientFeign {

    /**
     * 查询声音是否存在
     * @param trackId
     * @return
     */
    @GetMapping("/getTrackInfo/{trackId}")
    public Boolean getTrackInfo(@PathVariable("trackId")Long trackId);

    /**
     * 查询声音的详细信息
     * @param trackId
     * @return
     */
    @GetMapping("/getTrackInfoDetail/{trackId}")
    public TrackInfo getTrackInfoDetail(@PathVariable("trackId")Long trackId);



    /**
     * 查询即将确认订单的声音
     * @param trackId
     * @return
     */
    @GetMapping("/getTrackListAndPrice/{trackId}")
    public JSONObject getTrackListAndPrice(@PathVariable("trackId")Long trackId);


}